package ALog;

public class Date {
	private int day;
	private int month;
	private int year;

	public Date(int day, int month, int year) {
		this.day = day;
		this.month = month;
		this.year = year;
	}

	public String toString() {
		return this.day + "/ " + this.month + "/ " + this.year;
	}

	public boolean sameMonthInAYear(int month, int year) {
		return (this.month == month) && (this.year == year);
	}

	public boolean equals(Object o) {
		if (o == null || !(o instanceof Date))
			return false;
		else {
			Date that = (Date) o;
			return this.day == that.day && this.month == that.month
					&& that.year == that.year;

		}
	}
}
